<!--  -->
<script setup>
import { useBreadsStore } from '@/stores'

const { setBreadCrumbs } = useBreadsStore()
setBreadCrumbs([])

const newsList = [
  {
    id: 1,
    title: 'Swagger UI',
    link: 'https://meta.answer.dev/swagger/index.html#/'
  },
  {
    id: 2,
    title: 'Database',
    link: 'https://answer.apache.org/zh-CN/docs/database'
  }
]
</script>

<template>
  <div class="view-container">

    <div class="main-body">
      <div class="">
        <h3>网站介绍：</h3>
        <p>此项目仿造Apache Answer，但技术栈使用我更为熟悉的Vue3和SpringBoot，仅用于自我学习。</p>
        <p>ui 界面参考 <a href="https://answer.apache.org/">Apache Answer</a>, 感谢开源</p>
        <div class="divider"></div>
        <h3>技术栈：</h3>
      </div>
      <div>
        <h3>公开文档：</h3>
      </div>
      <div>
        <h3>参考资料：</h3>
        <div class="table">
          <div class="log" v-for="(news, idx) in newsList" :key="news.id">
            <div class="count">{{ idx }}</div>
            <a :href="news.link" class="item">{{ news.title }}</a>
          </div>
        </div>
      </div>
    </div>
    <div class="main-footer">
      <div class="footer-text">
        2025 ©
        <a href="https://gitee.com/dkwd">xcatp</a>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.view-container {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
}

.main-body {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 33% auto 33%;

  .divider {
    margin: 1em 0;
  }

  h3 {
    margin-bottom: 1em;
  }

  .select-btn {
    display: block;
  }

  a {
    color: rgb(0, 79, 182);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
  }
}

.main-footer {
  color: #b5c4b8;
  margin-left: auto;
}

a:hover {
  color: rgb(255, 132, 0);
}


.table {
  border: 15px ridge rgba(205, 203, 162, 0.285);
  margin: 10px auto;
  width: 100%;
  padding: 0px;

  .log {
    display: grid;
    grid-template-columns: minmax(10%, max-content) 1fr;
    gap: 1%;
    width: 100%;
    padding: 0 10px;
    font-size: 0.850rem;
    background: var(--bgc01);

    &:nth-child(even) {
      background: rgba(148, 148, 148, 0.165);
    }

    .count {
      display: block;
      padding: 2px;
      color: var(--text-grey);
      align-self: center;
    }

    .item {
      display: block;
      padding: 2px;
      align-self: center;
    }
  }
}

</style>
